package cn.leaf.uc.api.entity;

import cn.leaf.database.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
    * 权限表
    */
@Data
@EqualsAndHashCode(callSuper=true)
@Builder
@TableName(value = "t_permission")
public class PermissionEntity extends BaseEntity implements Serializable {
    /**
     * 父权限
     */
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 权限名称
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 菜单权限
     */
    @TableField(value = "permission")
    private String permission;

    /**
     * 路径
     */
    @TableField(value = "`path`")
    private String path;

    /**
     * 组件
     */
    @TableField(value = "component")
    private String component;

    /**
     * 菜单图标
     */
    @TableField(value = "icon")
    private String icon;

    /**
     * 排序值
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 是否缓存该页面: 1:是  0:不是
     */
    @TableField(value = "keep_alive")
    private String keepAlive;

    /**
     * 菜单类型
     */
    @TableField(value = "`type`")
    private String type;

    /**
     * 是否显示
     */
    @TableField(value = "hidden")
    private String hidden;

    /**
     * 是否外链
     */
    @TableField(value = "target")
    private String target;

    /**
     * 状态
     */
    @TableField(value = "`status`")
    private String status;

    /**
     * 删除标识
     */
    @TableField(value = "is_deleted")
    private String isDeleted;

    /**
     * 租户ID
     */
    @TableField(value = "tenant_id")
    private Long tenantId;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_PARENT_ID = "parent_id";

    public static final String COL_NAME = "name";

    public static final String COL_PERMISSION = "permission";

    public static final String COL_PATH = "path";

    public static final String COL_COMPONENT = "component";

    public static final String COL_ICON = "icon";

    public static final String COL_SORT = "sort";

    public static final String COL_KEEP_ALIVE = "keep_alive";

    public static final String COL_TYPE = "type";

    public static final String COL_HIDDEN = "hidden";

    public static final String COL_TARGET = "target";

    public static final String COL_INSERT_USER = "insert_user";

    public static final String COL_UPDATE_USER = "update_user";

    public static final String COL_INSERT_TIME = "insert_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_STATUS = "status";

    public static final String COL_IS_DELETED = "is_deleted";

    public static final String COL_TENANT_ID = "tenant_id";
}